package main

import "fmt"

func main() {
	arr1 := [2]int{1, 2}
	arr2 := [2]int{3, 4}
	fmt.Println(arr1, arr2)

	// 交换数据
	arr1, arr2 = arr2, arr1
	fmt.Println(arr1, arr2)

	a := [2]int{1, 2}
	a[0], a[1] = a[1], a[0]
	fmt.Println(a)

	// map赋值
	mm := make(map[string]int)
	mm["1"] = 1
	mm["2"] = 2

	m1, ok := mm["1"]
	if ok {
		fmt.Println(m1)
	}

}
